/*******************************************************************************
 * Copyright (c) 2022, 2022
 ******************************************************************************/
package com.alex.demo.swagger.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alex.demo.swagger.domain.User;

import io.swagger.annotations.ApiOperation;

/**
 * @Version 1.0
 * @Author Alex
 * @Created Dec 2022/9/30 15:03
 * @Description
 *              <p>
 */
@RestController
@RequestMapping("/swaggertest")
public class SwaggerTestController {

	@ApiOperation(value = "方法的注释")
	@GetMapping("/hello")
	public String hello(String username) {
		return "hello " + username;
	}

	@PostMapping(value = "/user")
	public User user() {
		return new User();
	}
}
